public class IdentityKit {
	public static int anInt814;
	public static IdentityKit[] appearances;
	public int anInt816 = -1;
	public int[] anIntArray817;
	public int[] anIntArray818 = new int[6];
	public int[] anIntArray819 = new int[6];
	public int[] anIntArray820 = { -1, -1, -1, -1, -1 };
	public boolean aBoolean821 = false;

	public static void method445(Archive archive, int i) {
		Packet packet = new Packet(archive.method154(
			"idk.dat", null));
		IdentityKit.anInt814 = packet.getUShort();
		if (IdentityKit.appearances == null) {
			IdentityKit.appearances = new IdentityKit[IdentityKit.anInt814];
		}
		for (int i_0_ = 0; i_0_ < IdentityKit.anInt814; i_0_++) {
			if (IdentityKit.appearances[i_0_] == null) {
				IdentityKit.appearances[i_0_] = new IdentityKit();
			}
			IdentityKit.appearances[i_0_].method446(packet);
		}
		if (i != 36135) {
			/* empty */
		}
	}

	public void method446(Packet packet) {
		for (;;) {
			int i_1_ = packet.getUByte();
			if (i_1_ == 0) {
				break;
			}
			if (i_1_ == 1) {
				anInt816 = packet.getUByte();
			} else if (i_1_ == 2) {
				int i_2_ = packet.getUByte();
				anIntArray817 = new int[i_2_];
				for (int i_3_ = 0; i_3_ < i_2_; i_3_++) {
					anIntArray817[i_3_] = packet.getUShort();
				}
			} else if (i_1_ == 3) {
				aBoolean821 = true;
			} else if (i_1_ >= 40 && i_1_ < 50) {
				anIntArray818[i_1_ - 40] = packet.getUShort();
			} else if (i_1_ >= 50 && i_1_ < 60) {
				anIntArray819[i_1_ - 50] = packet.getUShort();
			} else if (i_1_ >= 60 && i_1_ < 70) {
				anIntArray820[i_1_ - 60] = packet.getUShort();
			} else {
				System.out.println("Error unrecognised config code: " + i_1_);
			}
		}
	}

	public boolean method447(int i) {
		if (anIntArray817 == null) {
			return true;
		}
		boolean bool = true;
		i = 89 / i;
		for (int i_4_ = 0; i_4_ < anIntArray817.length; i_4_++) {
			if (!Model.method589(anIntArray817[i_4_])) {
				bool = false;
			}
		}
		return bool;
	}

	public Model method448(byte i) {
		if (anIntArray817 == null) {
			return null;
		}
		Model[] class50_sub1_sub4_sub4s = new Model[anIntArray817.length];
		for (int i_5_ = 0; i_5_ < anIntArray817.length; i_5_++) {
			class50_sub1_sub4_sub4s[i_5_] = Model.method588(anIntArray817[i_5_]);
		}
		Model model;
		if (class50_sub1_sub4_sub4s.length == 1) {
			model = class50_sub1_sub4_sub4s[0];
		} else {
			model = new Model(class50_sub1_sub4_sub4s.length,
				class50_sub1_sub4_sub4s, (byte) -89);
		}
		for (int i_6_ = 0; i_6_ < 6; i_6_++) {
			if (anIntArray818[i_6_] == 0) {
				break;
			}
			model.method602(anIntArray818[i_6_], anIntArray819[i_6_]);
		}
		if (i != 2) {
			throw new NullPointerException();
		}
		return model;
	}

	public boolean method449(int i) {
		if (i != -10584) {
			throw new NullPointerException();
		}
		boolean bool = true;
		for (int i_7_ = 0; i_7_ < 5; i_7_++) {
			if (anIntArray820[i_7_] != -1 && !Model.method589(anIntArray820[i_7_])) {
				bool = false;
			}
		}
		return bool;
	}

	public Model method450() {
		Model[] class50_sub1_sub4_sub4s = new Model[5];
		int i = 0;
		for (int i_8_ = 0; i_8_ < 5; i_8_++) {
			if (anIntArray820[i_8_] != -1) {
				class50_sub1_sub4_sub4s[i++] = Model
					.method588(anIntArray820[i_8_]);
			}
		}
		Model model = new Model(i,
			class50_sub1_sub4_sub4s, (byte) -89);
		for (int i_9_ = 0; i_9_ < 6; i_9_++) {
			if (anIntArray818[i_9_] == 0) {
				break;
			}
			model.method602(anIntArray818[i_9_], anIntArray819[i_9_]);
		}
		return model;
	}
}
